import { Component, EventEmitter, Input, Output, SimpleChange } from '@angular/core';

@Component({
    selector: 'app-item-detail',
    templateUrl: './item-detail.component.html',
    styleUrls: ['./item-detail.component.css'],
    standalone: false
})
export class ItemDetailComponent {
  @Input() item = '';
  @Output() newItemEvent = new EventEmitter<string>();
  ngOnChanges(changes: SimpleChange) {
    console.log(changes);
  }

  addNewItem(value:string){
    this.newItemEvent.emit(value)
  }
}

